package javaCode.chapter07.Homework.homework05;

/*
设计父类——员工类。子类：工人类(worker)，农名类(Peasant)，教师类(Teacher)，科学家类(Scientist)，服务生类(Waiter)
1、其中工人，农民，服务生只有基本工资sal
2、教师除基本工资外，还有课酬(元/天) classDay，classSal
3、科学家除基本工资外，还有年终奖 bonus
4、编写一个测试类，将各种类型的员工的全年工资打印出来
 */
public class Homework05 {
    public static void main(String[] args) {

        Worker worker = new Worker("张三", 3000);
        worker.setSalMonth(15); //灵活修改 不同年薪月份
        worker.yearSal();

        Teacher teacher = new Teacher("王二", 4000);
        teacher.setClassDay(200);
        teacher.setClassSal(100);
        teacher.yearSal();

        Scientist scientist = new Scientist("李四", 14000);
        scientist.setBonus(250000);
        scientist.yearSal();

    }
}

